﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/SiteMaster.Master"
    Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<%@ Import Namespace="Microhard.Framework.MVCHelper" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    出库登记
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div class="section-header">
        <div class="title">
            <img src="<%=Url.Content("~/Content/images/ico-catalog.png")%>" alt="" />
            出库登记
        </div>
        <div class="options">
        </div>
    </div>
    <table width="100%">
        <tr>
            <td class="adminTitle">
                &nbsp
            </td>
            <td class="adminData">
                &nbsp
            </td>
        </tr>
    </table>
    <p>
    </p>
    <table class="adminContent">
        <tr>
            <td>
                <% Html.Telerik().Grid<Microhard.WarehouseInsp.Buz.Models.OutIntPutWarehouseModel>()
                       .Name("operation-grid").ToolBar(t => t.Template(g =>
                 {
                %>
                <div class="header-menu">
                    <ul class="t-widget t-reset t-header t-menu">
                        <li class="t-item  t-state-default">
                            <%=Html.Authorized_UpdateButton("btnUpdate", "登记", "operation-grid", "Update", "OutPutWarehouse", "WarehouseInsp")%>
                        </li>
                    </ul>
                </div>
                <% 
                 })).Columns(columns =>
                 {
                     columns.Bound(x => x.OutInPutWarehouseID).Template(x => Html.CheckBox("checkedRecords", new { value = x.OutInPutWarehouseID, @class = "gridCks" }))
                         .ClientTemplate("<input type='checkbox' name='checkedRecords' value='<#= OutInPutWarehouseID #>' class='gridCks'/>")
                       .HtmlAttributes(new { style = "text-align:center" }).Title("选择");
                     columns.Bound(x => x.WarehouseName).Title("仓库名");
                     columns.Bound(x => x.Project.Name).Title("项目名");

                     columns.Bound(x => x.PPInRecord.Product.Name).Title("名称");
                     columns.Bound(x => x.PPInRecord.PlgCategory).Title("类别");
                     columns.Bound(x => x.OutInPrice).Title("单价(元)").Format("{0:N}");
                     columns.Bound(x => x.OutInCount).Title("数量");
                     columns.Bound(x => x.OutInAmount).Title("合计(元)").Format("{0:N}");
                     //columns.Bound(x => x.ApplyTime).Title("申请时间");
                     //columns.Bound(x => x.ApproveTime).Title("审批时间");
                     columns.Bound(x => x.PlayExTime).Title("出库时间");
                     columns.Bound(x => x.OIPutType).Title("出入库类型");
                     columns.Bound(x => x.OutStatus).Title("出库状态");
                 }

                     ).Pageable(settings => settings.Total(Model.Total).PageSize(Html.GetGridPageSize()).Position(GridPagerPosition.Top))
                       //绑定搜索按钮，执行对应的action
                    .DataBinding(dataBinding => dataBinding.Ajax().Select("_List", "OutPutWarehouse"
                        , new
                        {
                            OutInPutType = (int)Microhard.WarehouseInsp.Buz.BuzEnum.OutInPutType.Out,
                            Status = (int)Microhard.WarehouseInsp.Buz.BuzEnum.PrjStatus.WithFS
                        }))
                    .EnableCustomBinding(true)
                    .Render();
                %>
            </td>
        </tr>
    </table>
</asp:Content>
